using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace vdside.Docking
{
    public partial class DocumentMainForm : WeifenLuo.WinFormsUI.Docking.DockContent
    {
        public DocumentMainForm()
        {
            InitializeComponent();
        }

        private void DocumentMainForm_Load(object sender, EventArgs e)
        {
            this.Text = label1.Text;
        }

        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            
            if (this.Text == "NewDocument")
            {
                
            }
            try
            {
                MessageBox.Show(this.Text, "Save", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                System.IO.File.WriteAllText(this.Text, textBox1.Text);
            }
            catch
            {
                MessageBox.Show("Cant Save File", "Save", MessageBoxButtons.OK, MessageBoxIcon.Stop);
            }
        }
    }
}